<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="TOKN">﻿</span><span class="COMM">/*
<span class='line'>  2</span> Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
<span class='line'>  3</span> For licensing, see LICENSE.html or http://ckeditor.com/license
<span class='line'>  4</span> */</span><span class="WHIT">
<span class='line'>  5</span>
<span class='line'>  6</span> </span><span class="COMM">/**
<span class='line'>  7</span>  * @fileOverview Defines the {@link CKEDITOR.resourceManager} class, which is
<span class='line'>  8</span>  *		the base for resource managers, like plugins and themes.
<span class='line'>  9</span>  */</span><span class="WHIT">
<span class='line'> 10</span>
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="COMM">/**
<span class='line'> 12</span>  * Base class for resource managers, like plugins and themes. This class is not
<span class='line'> 13</span>  * intended to be used out of the CKEditor core code.
<span class='line'> 14</span>  * @param {String} basePath The path for the resources folder.
<span class='line'> 15</span>  * @param {String} fileName The name used for resource files.
<span class='line'> 16</span>  * @namespace
<span class='line'> 17</span>  * @example
<span class='line'> 18</span>  */</span><span class="WHIT">
<span class='line'> 19</span> </span><span class="NAME">CKEDITOR.resourceManager</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">basePath</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">fileName</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 20</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 21</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 22</span> 	 * The base directory containing all resources.
<span class='line'> 23</span> 	 * @name CKEDITOR.resourceManager.prototype.basePath
<span class='line'> 24</span> 	 * @type String
<span class='line'> 25</span> 	 * @example
<span class='line'> 26</span> 	 */</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="WHIT">	</span><span class="NAME">this.basePath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">basePath</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 28</span>
<span class='line'> 29</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 30</span> 	 * The name used for resource files.
<span class='line'> 31</span> 	 * @name CKEDITOR.resourceManager.prototype.fileName
<span class='line'> 32</span> 	 * @type String
<span class='line'> 33</span> 	 * @example
<span class='line'> 34</span> 	 */</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="WHIT">	</span><span class="NAME">this.fileName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">fileName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 36</span>
<span class='line'> 37</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 38</span> 	 * Contains references to all resources that have already been registered
<span class='line'> 39</span> 	 * with {@link #add}.
<span class='line'> 40</span> 	 * @name CKEDITOR.resourceManager.prototype.registered
<span class='line'> 41</span> 	 * @type Object
<span class='line'> 42</span> 	 * @example
<span class='line'> 43</span> 	 */</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="WHIT">	</span><span class="NAME">this.registered</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 45</span>
<span class='line'> 46</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 47</span> 	 * Contains references to all resources that have already been loaded
<span class='line'> 48</span> 	 * with {@link #load}.
<span class='line'> 49</span> 	 * @name CKEDITOR.resourceManager.prototype.loaded
<span class='line'> 50</span> 	 * @type Object
<span class='line'> 51</span> 	 * @example
<span class='line'> 52</span> 	 */</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT">	</span><span class="NAME">this.loaded</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 54</span>
<span class='line'> 55</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 56</span> 	 * Contains references to all resources that have already been registered
<span class='line'> 57</span> 	 * with {@link #addExternal}.
<span class='line'> 58</span> 	 * @name CKEDITOR.resourceManager.prototype.externals
<span class='line'> 59</span> 	 * @type Object
<span class='line'> 60</span> 	 * @example
<span class='line'> 61</span> 	 */</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT">	</span><span class="NAME">this.externals</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 63</span>
<span class='line'> 64</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 65</span> 	 * @private
<span class='line'> 66</span> 	 */</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT">	</span><span class="NAME">this._</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">		</span><span class="COMM">// List of callbacks waiting for plugins to be loaded.</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">		</span><span class="NAME">waitingList</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 73</span>
<span class='line'> 74</span> </span><span class="NAME">CKEDITOR.resourceManager.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 77</span> 	 * Registers a resource.
<span class='line'> 78</span> 	 * @param {String} name The resource name.
<span class='line'> 79</span> 	 * @param {Object} [definition] The resource definition.
<span class='line'> 80</span> 	 * @example
<span class='line'> 81</span> 	 * CKEDITOR.plugins.add( 'sample', { ... plugin definition ... } );
<span class='line'> 82</span> 	 * @see CKEDITOR.pluginDefinition
<span class='line'> 83</span> 	 */</span><span class="WHIT">
<span class='line'> 84</span> </span><span class="WHIT">	</span><span class="NAME">add</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.registered</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">			</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">'[CKEDITOR.resourceManager.add] The resource name "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" is already registered.'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 88</span>
<span class='line'> 89</span> </span><span class="WHIT">		</span><span class="NAME">this.registered</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">definition</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 91</span>
<span class='line'> 92</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 93</span> 	 * Gets the definition of a specific resource.
<span class='line'> 94</span> 	 * @param {String} name The resource name.
<span class='line'> 95</span> 	 * @type Object
<span class='line'> 96</span> 	 * @example
<span class='line'> 97</span> 	 * var definition = &lt;b>CKEDITOR.plugins.get( 'sample' )&lt;/b>;
<span class='line'> 98</span> 	 */</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">	</span><span class="NAME">get</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.registered</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>103</span>
<span class='line'>104</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>105</span> 	 * Get the full path for a specific loaded resource.
<span class='line'>106</span> 	 * @param {String} name The resource name.
<span class='line'>107</span> 	 * @type String
<span class='line'>108</span> 	 * @example
<span class='line'>109</span> 	 * alert( &lt;b>CKEDITOR.plugins.getPath( 'sample' )&lt;/b> );  // "&lt;editor path&gt;/plugins/sample/"
<span class='line'>110</span> 	 */</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">	</span><span class="NAME">getPath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.externals</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.basePath</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'/'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>115</span>
<span class='line'>116</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>117</span> 	 * Registers a resource to be loaded from an external path instead of the core base path.
<span class='line'>118</span> 	 * @param {String} name The resource name.
<span class='line'>119</span> 	 * @param {String} path The resource external path.
<span class='line'>120</span> 	 * @example
<span class='line'>121</span> 	 * // Loads a plugin from '/myplugin/samples/plugin.js'.
<span class='line'>122</span> 	 * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' );
<span class='line'>123</span> 	 */</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">	</span><span class="NAME">addExternal</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">path</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.registered</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.externals</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">			</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">'[CKEDITOR.resourceManager.import] The resource name "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" is already registered or imported.'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>128</span>
<span class='line'>129</span> </span><span class="WHIT">		</span><span class="NAME">this.externals</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">path</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>131</span>
<span class='line'>132</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>133</span> 	 * Loads one or more resources.
<span class='line'>134</span> 	 * @param {String|Array} name The name of the resource to load. It may be a
<span class='line'>135</span> 	 *		string with a single resource name, or an array with several names.
<span class='line'>136</span> 	 * @param {Function} callback A function to be called when all resources
<span class='line'>137</span> 	 *		are loaded. The callback will receive an array containing all
<span class='line'>138</span> 	 *		loaded names.
<span class='line'>139</span> 	 * @param {Object} [scope] The scope object to be used for the callback
<span class='line'>140</span> 	 *		call.
<span class='line'>141</span> 	 * @example
<span class='line'>142</span> 	 * &lt;b>CKEDITOR.plugins.load&lt;/b>( 'myplugin', function( plugins )
<span class='line'>143</span> 	 *     {
<span class='line'>144</span> 	 *         alert( plugins['myplugin'] );  // "object"
<span class='line'>145</span> 	 *     });
<span class='line'>146</span> 	 */</span><span class="WHIT">
<span class='line'>147</span> </span><span class="WHIT">	</span><span class="NAME">load</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">names</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">scope</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>149</span> </span><span class="WHIT">		</span><span class="COMM">// Ensure that we have an array of names.</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">CKEDITOR.tools.isArray</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">names</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">			</span><span class="NAME">names</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">names</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">names</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>152</span>
<span class='line'>153</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">loaded</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.loaded</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">			</span><span class="NAME">registered</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.registered</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">			</span><span class="NAME">urls</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">			</span><span class="NAME">urlsNames</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">			</span><span class="NAME">resources</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>158</span>
<span class='line'>159</span> </span><span class="WHIT">		</span><span class="COMM">// Loop through all names.</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">names.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">		</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">names</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>163</span>
<span class='line'>164</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">				</span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>166</span>
<span class='line'>167</span> </span><span class="WHIT">			</span><span class="COMM">// If not available yet.</span><span class="WHIT">
<span class='line'>168</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">loaded</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">registered</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">url</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">CKEDITOR.getUrl</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">this.getPath</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.fileName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'.js'</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>171</span> </span><span class="WHIT">				</span><span class="NAME">urls.push</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">url</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>172</span> </span><span class="WHIT">				</span><span class="NAME">urlsNames</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">url</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">			</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">				</span><span class="NAME">resources</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.get</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>177</span>
<span class='line'>178</span> </span><span class="WHIT">		</span><span class="NAME">CKEDITOR.scriptLoader.load</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">urls</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">completed</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">failed</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">			</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">failed.length</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">					</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">'[CKEDITOR.resourceManager.load] Resource name "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">urlsNames</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">failed</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'" was not found at "'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">failed</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'".'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>182</span>
<span class='line'>183</span> </span><span class="WHIT">				</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">completed.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">				</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">urlsNames</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">completed</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>186</span> </span><span class="WHIT">					</span><span class="NAME">resources</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.get</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>187</span>
<span class='line'>188</span> </span><span class="WHIT">					</span><span class="NAME">loaded</span><span class="PUNC">[</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>189</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>190</span>
<span class='line'>191</span> </span><span class="WHIT">				</span><span class="NAME">callback.call</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">scope</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">resources</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>193</span> </span><span class="WHIT">			</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>194</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>195</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>196</span> </span></pre></body></html>
